package com.novax.ex.activity.infrastructure.mapper;

import com.novax.ex.activity.infrastructure.entity.TaskReward;
import com.novax.ex.common.base.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

import java.util.List;

/**
 * @author Hsylient
 * @description 针对表【task_reward(奖励配置表)】的数据库操作Mapper
 * @createDate 2023-06-20 16:47:39
 * @Entity com.novax.ex.activity.infrastructure.entity.TaskReward
 */
public interface TaskRewardMapper extends BaseMapper {


    /**
     * 通过用户所在的版本ID查出来该版本对应的奖励情况
     *
     * @param versionId 版本号
     * @return 奖励详细信息
     */
    List<TaskReward> selectRewardByVersionId(@Param("versionId") Long versionId);

    /**
     * 根据步骤获取奖励
     *
     * @param step 步骤
     * @return 奖励
     */
    TaskReward selectByStep(@Param("step") Integer step);

    List<TaskReward> selectAll();
}

